package com.mhkj.workspace.notify.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.mhkj.revise.plan.entity.PlanNode;
import com.mics.core.common.validate.annotation.NotNull;
import com.mics.core.common.validate.annotation.Validate;
import com.mics.core.system.base.entity.BaseDomain;

@Entity
@Table(name="t_notify")
@Validate
public class Notify extends BaseDomain {
    /**
     * 序列号
     */
    private static final long serialVersionUID = -4070352337269120457L;
    
    /**
     * 发送人
     */
    @Column(name="s_name",length=48)
    @NotNull(message="发送人姓名不能为空")
    private  String sName;



    /**
     * 发送方式
     * 1、系统发送  2、人员发送
     */
    @Column(name = "method")
    private int method=1;
	/**
	 * 读取状态
	 * 0、未读  1、已读
	 */
	@Column(name = "estate")
    private int estate =0;
    /**
     * 提醒类型 1、待办  2、延期提醒消息 3、进度汇报提醒 4、进度确认提醒 5、罚款提醒 6、风险 7、失控
     */
    @Column(name="type")
    private int type;
    
    /**
     * 发送内容
     */
    @Column(name="content",length=225)
    @NotNull(message="发送内容不能为空")
    private String content;

    /**
     * 接受用户id
     */
    @Column(name="accept_user_id",length=64)
    @NotNull(message="接受用户不能为空")
    private String acceptUserId;

    /**
     * 关联计划id
     */
    @JoinColumn(name="plan_node_id")
    @ManyToOne(fetch=FetchType.LAZY)
    private PlanNode planNode;

	public String getsName() {
		return sName;
	}


	public void setsName(String sName) {
		this.sName = sName;
	}


	public int getType() {
		return type;
	}


	public void setType(int type) {
		this.type = type;
	}


	public String getContent() {
		return content;
	}


	public void setContent(String content) {
		this.content = content;
	}


	public int getMethod() {
		return method;
	}


	public void setMethod(int method) {
		this.method = method;
	}


	public String getAcceptUserId() {
		return acceptUserId;
	}


	public void setAcceptUserId(String acceptUserId) {
		this.acceptUserId = acceptUserId;
	}


	public PlanNode getPlanNode() {
		return planNode;
	}


	public void setPlanNode(PlanNode planNode) {
		this.planNode = planNode;
	}

	public int getEstate() { return estate; }

	public void setEstate(int estate) { this.estate = estate; }
}
